package com.siysoft.tc.base.bean.to;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;


/**
 * The persistent class for the db_resource database table.
 * 
 */
@Entity
@Table(name="db_resource")
public class Resource implements Serializable {
	private static final long serialVersionUID = 1L;
	private int resourceId;
	private String absoluteUrl;
	private int auditFlag;
	private Timestamp auditTime;
	private int dataId;
	private String dataType;
	private String imgPath;
	private int managerId;
	private Timestamp uploadTime;
	private int userId;

	public Resource() {
	}
	/**
	 * 构造方法，用于注册老师
	 * @param dataType 资源类型
	 * @param dataId 资源对应实体PK
	 * @param imgPath 资源相对路径
	 * @param userId 用户ID
	 */
	public Resource(String dataType,int dataId){
		this.dataType=dataType;
		this.dataId=dataId;
		this.userId=dataId;
		this.auditFlag=(byte)0;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="resource_id")
	public int getResourceId() {
		return this.resourceId;
	}

	public void setResourceId(int resourceId) {
		this.resourceId = resourceId;
	}


	@Column(name="absolute_url")
	public String getAbsoluteUrl() {
		return this.absoluteUrl;
	}

	public void setAbsoluteUrl(String absoluteUrl) {
		this.absoluteUrl = absoluteUrl;
	}


	@Column(name="audit_flag")
	public int getAuditFlag() {
		return this.auditFlag;
	}

	public void setAuditFlag(int auditFlag) {
		this.auditFlag = auditFlag;
	}


	@Column(name="audit_time")
	public Timestamp getAuditTime() {
		return this.auditTime;
	}

	public void setAuditTime(Timestamp auditTime) {
		this.auditTime = auditTime;
	}


	@Column(name="data_id")
	public int getDataId() {
		return this.dataId;
	}

	public void setDataId(int dataId) {
		this.dataId = dataId;
	}


	@Column(name="data_type")
	public String getDataType() {
		return this.dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}


	@Column(name="img_path")
	public String getImgPath() {
		return this.imgPath;
	}

	public void setImgPath(String imgPath) {
		this.imgPath = imgPath;
	}


	@Column(name="manager_id")
	public int getManagerId() {
		return this.managerId;
	}

	public void setManagerId(int managerId) {
		this.managerId = managerId;
	}


	@Column(name="upload_time")
	public Timestamp getUploadTime() {
		return this.uploadTime;
	}

	public void setUploadTime(Timestamp uploadTime) {
		this.uploadTime = uploadTime;
	}


	@Column(name="user_id")
	public int getUserId() {
		return this.userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

}